#include "MyQueue.h"

void CMyQueue::enqueue(int item)
{
	if(!isFull()){
		tail = (tail+1) % max;
		m_iQueue[tail] = item;
		size++;
	}
}

int CMyQueue::dequeue()
{
	if(!isEmpty()){
		front = (front+1) % max;
		size--;
		return m_iQueue[front];
	}
	return -1;
}